﻿using System;
using System.Security.Principal;

namespace CIK.News.Web.Infrastructure.Security
{
    public class WebPrincipal : IWebPrincipal
    {
        private readonly string _token;
        private readonly string _userName;
        private readonly string _displayName;
        private readonly IIdentity _identity;

        public WebPrincipal(IIdentity identity, string token, string userName, string displayName)
        {
            _token = token;
            _identity = identity;
            _displayName = displayName;
            _userName = userName;
        }

        #region IPrincipal Members

        public string Token
        {
            get { return _token; }
        }

        public string UserName
        {
            get { return _userName; }
        }

        public string DisplayName
        {
            get { return _displayName; }
        }


        public IIdentity Identity
        {
            get { return _identity; }
        }

        public bool IsInRole(string role)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}